partition of closed interval